# f = lambda N:(lambda t,f: f(t,f))(N, (lambda f,_={}:lambda *__:(_.__setitem__(__,f(*__,len([[]]))) if __ not in _ else None, _[__])[1])(lambda t, f, ___: f(t-___,f)+f(t-___-___,f) if t-___>___ else ___))
def fib(N):
    def recursiver(t,f):
        return f(t,f)
    def memorize(f,store={}):
        def proxy(*args):
            if args not in store:
                store[args]=f(*args)
            setitem_always_return_none=None
            load_from_store=store[args]
            all_value=(setitem_always_return_none,load_from_store)
            return all_value[1]
        return proxy
    def fib_inner(t,f,one=len([[]])):
        if t-one > one:
            return f(t-one,f)+f(t-one-one,f)
        else:
            return one
    fib_inner_mem=memorize(fib_inner)
    return recursiver(N,fib_inner_mem)
